Skip to content

Fix reviewer suggestion confidence for sole experts#4905

Merged
simonfaltum merged 1 commit intomainfrom
simonfaltum/fix-reviewer-confidence
Apr 6, 2026
Merged

Fix reviewer suggestion confidence for sole experts#4905
simonfaltum merged 1 commit intomainfrom
simonfaltum/fix-reviewer-confidence

Conversation

@simonfaltum
Copy link
Copy Markdown
Member

Why

The suggest-reviewers GitHub Action had two issues:

  1. When a single person was the sole contributor to all changed files, confidence was reported as "low" instead of "high". This happened because compute_confidence treated len(ss) < 2 as insufficient data, when it actually means there's one clear expert.
  2. Output files (out.*, output.txt) were scored 0.0 and completely excluded from analysis. Reviewers should still verify output changes make sense, so these files deserve a small (but non-zero) contribution to scoring.

Changes

Before: Sole-author PRs always got "low" confidence. Output files were invisible to the scoring algorithm. PRs with exactly 2 contributors also always got "low" confidence (the >= 3 guards prevented any comparison).

Now:

  • len(ss) == 1 (sole contributor) returns "high" confidence
  • len(ss) == 2 compares top vs second using the same 2x/1.5x thresholds
  • Output files get weight 0.01 / total_files instead of 0.0, contributing signal without dominating scores
  • Removed dead if weight == 0.0 guard that could never trigger after the weight change

Test plan

This pull request was AI-assisted by Isaac.

…coring

The confidence calculation returned "low" when a single person was the sole
contributor to all changed files, which is actually maximum confidence. Also,
output files (out.*, output.txt) were scored 0.0 and completely excluded from
reviewer analysis. They now get a small weight (0.01/total_files) so they
contribute signal without dominating scores.

Co-authored-by: Isaac
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

Eligible reviewers

Could not determine reviewers from git history. Based on CODEOWNERS, these people or teams could review:

@andrewnester, @anton-107, @denik, @pietern, @shreyas-goenka

Suggestions based on git history of 1 changed files (0 scored). See CODEOWNERS for path-specific ownership rules.

@simonfaltum simonfaltum added this pull request to the merge queue Apr 6, 2026
Merged via the queue into main with commit 6426d26 Apr 6, 2026
18 checks passed
@simonfaltum simonfaltum deleted the simonfaltum/fix-reviewer-confidence branch April 6, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants